<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*,com.jspsmart.upload.*"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
	SmartUpload su = new SmartUpload();
	su.initialize(pageContext);
	su.upload();
	int count = su.save("/upload",SmartUpload.SAVE_VIRTUAL);
	out.println(count+"个文件上传成功！<br>");
	for(int i= 0;i<su.getFiles().getCount();i++){
		File file = su.getFiles().getFile(i);
		if(file.isMissing()){
			continue;
		}
		out.print("<br>文件名："+file.getFieldName()+" 长度:" +file.getSize());
	}
%>
</body>
</html>